package com.cq.hd.product.factory;

import com.cq.hd.product.api.dto.ActiveReleaseDto;
import com.cq.hd.product.api.dto.ActiveUpdateDto;
import com.cq.hd.product.service.TbActiveGroupBuyService;
import org.springframework.beans.factory.annotation.Autowired;

import javax.annotation.PostConstruct;

public abstract class AbstractActiveReleaseHandler {

    @Autowired
    protected TbActiveGroupBuyService activeGroupBuyService;

    @PostConstruct
    public void init() {
        ActiveReleaseFactory.register(getType(), this);
    }

    protected abstract Integer getType();

    public abstract Long saveActiveData(ActiveReleaseDto activeReleaseDto);

}
